package timerwheel

/*
定时器上的最小刻度
*/
type bucket struct {
	//在时间轮上的Key
	TimerKey int64
	//第一个
	Root *taskModel
	//最后一个
	Prev *taskModel
}

func (this *bucket) AddTask(task *taskModel) {
	if this.Prev == nil {
		this.Root = task
		this.Prev = task
	} else {
		this.Prev.Next = task
		this.Prev = task
	}
}

func (this *bucket) init() {
	this.TimerKey = 0
	this.Root = nil
	this.Prev = nil
}
